package gxdlxy.zx2202.chat5;

public class Example2 {
    public static void main(String[] args) {
        String str1 = "123";
        System.out.println(str1 + "哈希编码:" + str1.hashCode());
        str1 = "456";
        System.out.println(str1 + "哈希编码:" + str1.hashCode());

        StringBuffer str2 = new StringBuffer();
        str2.append("123");
        System.out.println(str2.toString() + "哈希编码:" + str2.hashCode());
        str2.delete(0, 3);
        str2.append("456");
        System.out.println(str2.toString() + "哈希编码:" + str2.hashCode());
    }
}
